(define (hannoi n)
  (define (move n from to spare)
    (cond ((= n 0) "Done")
          (else 
		      (move (- n 1) from spare to)
		      (display (list "move " n " " from " " to " " spare)) 
		      (newline)
          (move (- n 1) spare to from))))
	
	 (move n 'A 'B 'C))

(hannoi 3)